package com.lanou.service.impl;

import com.lanou.bean.Cost;
import com.lanou.mapper.CostMapper;
import com.lanou.service.CostService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by dllo on 18/3/15.
 */
@Service
public class CostServiceImpl implements CostService {
    @Resource
    CostMapper costMapper;

    @Override
    public List<Cost> selectAllCost() {
        return costMapper.selectAllCost();
    }

    @Override
    public List<Cost> selectAllCost1() {
        return costMapper.selectAllCost1();
    }

    @Override
    public List<Cost> selectAllCost2() {
        return costMapper.selectAllCost2();
    }

    @Override
    public void addCost(Cost cost) {
        costMapper.addCost(cost);
    }

    @Override
    public void startOrStop(int id, String status, String startime) {
        costMapper.startOrStop(id, status, startime);
    }

    @Override
    public void deleCost(int id) {
        costMapper.deleCost(id);
    }

    @Override
    public Cost selectCostById(int id) {
        return costMapper.selectCostById(id);
    }

    @Override
    public void updataCost(int costId, String name, int baseDuration, int baseCost, int unitCost, String descr, String costType) {
        costMapper.updataCost(costId, name, baseDuration, baseCost, unitCost, descr, costType);
    }

}